package com.xh.bussiness.tiku.dao;

import com.xh.bussiness.tiku.model.BookVersion;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 教材版本 Mapper 接口
 * </p>
 *
 * @author daiwei
 * @since 2019-02-23
 */
public interface BookVersionMapper extends BaseMapper<BookVersion> {

	void truncateTable();

	List<BookVersion> queryBookVersionGroupByVersion(@Param("subjectId") String subjectId);

	List<BookVersion> queryBookVersionBySubjectAndVersionId(@Param("subjectId") String subjectId, @Param("versionId") String versionid);

	List<BookVersion> queryBookVersionBySubjectCode(@Param("subjectCode") String subjectCode);

	Integer getMaxSortIndex(@Param("subjectCode") String subjectCode,@Param("versionId") String versionId);

	Integer deleteBookVersion(BookVersion bookVersion);
}
